home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
By Popular Request 2.0
/
By Popular Request 2.0 (Arsenal Computer).ISO
/
amiga_2
/
cnetjam2.lha
/
CNetJam2
/
cnet
/
pfiles
/
fido
/
TossReporter
< prev
Wrap
Text File
|
1995-01-28
|
5KB
|
91 lines
/**************************************************************************\
$VER: Toss Reporter, v2.0 (28-Jan-95) by Dotoran!
\**************************************************************************/
options results;signal on SYNTAX;signal on ERROR;signal on IOERR
tr=transmit;se=sendstring;gc=getchar;gu=getuser;gs=getscratch
a='rexxsupport.library';if ~show('l',a) then if ~addlib(a,0,-30) then exit
changewhere "Toss Reporter";logentry "Starting Toss Reporter..."
NetWork=2 /* Scan Which Network: 1=UUCP, 2=FIDO, etc. */
cs="dabe" /* MCI Colors to Create Lines with. */
/* This will take your "toss" log and create a user readable version that
lists total number of posts, responses, both and packets for each echo
in above specified network. You should run this as an event shortly
after your CNet Toss finishes importing messages. Here's what my event
settings look like for this file:
Command: RunARexx
Args: pfiles:fido/TossReporter
[port(s)]: 1 (whatever works for you)
Type: Immediate--force system idle
Days: Check ALL Seven
Time: 900 (1 hour after I poll)
Valid: 100 (try to run between 9 and 10)
Interval: 1200 (run every 12 hours)
Iterate: 2 (twice a day)
This file can be loaded from the "FidoMenu" which is also located in
this directory. If you'd like, you can also create a recurring news
message that will display the file "TossReport", which will also be
stored in this directory. If the "news" area is a bit busy on your bbs,
then you might want to place it in your entry file for the particular
network it goes with.
*/
if ~exists('sysdata:log/toss') then do
tr 'No Log Present';logentry "...No Toss Log to Process!";exit;end
se '@4Reading "subboards3" file...';sub.="";log.=""
c=0;call open(f1,'sysdata:subboards3','r');do forever;a=readch(f1,488)
if eof(f1) then leave;sub=CHOP(substr(a,1,31));typ=c2d(substr(a,270,1))
net=c2d(substr(a,295,1));if net~=NetWork|typ>1 then iterate;c=c+1;se "."
sub.c=sub;log.c=left(sub,20);end;subs=c;call close(f1);tr "done."
packets=0;netmail=0;tossed=0;posts=0;responses=0;messages=0
packets.=0;posts.=0;responses.=0
call open(f1,'sysdata:log/toss','r');se 'n1Reading "toss" log...'
do i=1 until eof(f1);l.i=readln(f1);se '.';end i;tot=i-1;tr 'done.n1'
call close(f1)
se "Working...";do i=1 to tot;se "."
if left(l.i,4)='Scan' & index(l.i,'echo')~=0 then do
parse var l.i j'; 'j' 'a' 'j;tossed=tossed+a;end
if left(l.i,4)='Scan' & index(l.i,'netmail')~=0 then do
parse var l.i j' 'a' 'j;netmail=netmail+a;end
if left(l.i,4)='Toss' then do;parse var l.i j' : 'a' mes'j
packets=packets+1;messages=messages+a;end
if left(l.i,4)='Impo' then do;parse var l.i j'to 'a1': 'a2' 'j' 'a3' r'j
do j=1 to subs;if log.j=a1 then do;posts=posts+a2;responses=responses+a3
posts.j=posts.j+a2;responses.j=responses.j+a3;packets.j=packets.j+1;end
end j;r=6;end
end i;tr "done.";c=1
t.1="f1z6c4 z0 z6 New z0 z6 New z0 z6 Total z0 z6 From z0"
t.2="z6c4 Name of Network Subboard z0 z6Postsz0 z6Repliesz0 z6Messagesz0 z6Packetsz0"
t.3="cc=============================== ===== ======= ======== ======="
do i=1 to subs;sub=NOMCI(sub.i);co="c"substr(cs,c,1);c=c+1;if c>length(cs) then c=1
l.i=co" "sub".32}"right(posts.i,4)" "right(responses.i,6)" "
l.i=l.i" "right(posts.i+responses.i,5)" "right(packets.i,7)
if i//15=0 then l.i=l.i"n2c7Press ccANY c7key...g1"||t.1"n1"t.2"n1"t.3
end i;co="c"substr(cs,c,1)
b.1="cc=============================== ===== ======= ======== ======="
b.2="c7 Received "co||netmail" c7NetMails..24}Totals: "co||right(posts,4)
b.2=b.2" "right(responses,6)" "right(messages,5)" "right(packets,7)
b.3="n1c7Press ccANY c7key...g1"
call open(f1,"pfiles:fido/TossReport","w");do i=1 to 3;call writeln(f1,t.i);end i
do i=1 to subs;call writeln(f1,l.i);end i;do i=1 to 3;call writeln(f1,b.i);end i
call close(f1)
address command "delete sysdata:log/toss";logentry "...created Toss Report!";exit
CHOP:;return left(Arg(1),index(Arg(1),"0"x)-1)
NOMCI:;parse arg sub;do until index(sub,"")=0;sub=delstr(sub,index(sub,""),3);end;return sub
SYNTAX:;ERROR:;IOERR:;e1=' c9Errorcf: ca'rc' cf(ca'errortext(rc)'cf)';e2=' c9Linecf: ce'left(sigl,4)'c9Filecf:'
gu 1311992;a=result;gu 1311960;b=result;c='cb"ce'a||b'cb"';e2=e2' 'c;tr e1;tr e2;logentry e1;logentry e2;e=sourceline(sigl)
do while e~='';e3='c9Sourcecf: cd'left(e,37);tr e3;logentry e3;e=substr(e,38);end;bufferflush;exit
/** Last Edited: 28-Jan-95 ************************************************\
\****************************************** FRONTIERS BBS (716)/823-9892 **/